package com.dreamwhale.machinery.service;

import com.dreamwhale.machinery.entity.InfoCollect;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 资讯收藏 服务类
 * </p>
 *
 * @author Author
 * @since 2020-06-08
 */
public interface InfoCollectService extends IService<InfoCollect> {

    /**
     * 添加资讯
     *
     * @param infoCollect
     * @return
     */
    int insertInfoCollect(InfoCollect infoCollect);

    /**
     * 删除资讯
     *
     * @param infoCollect
     * @return
     */
    int delInfoCollects(InfoCollect infoCollect);

    /**
     * 查询我收藏的资讯
     *
     * @param
     * @return
     */
    List<InfoCollect> selectInfoCollect(Integer userId,Integer type);

    /**
     * 查重
     *
     * @param userId
     * @param infoId
     * @param accessType
     * @return
     */
    int selectInfoCollectCount(String userId, Integer infoId, Integer accessType);
}
